using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class TowerHolder : MonoBehaviour
{
    public static TowerHolder instance;
    [Header("基本参数")]
    public int  health = 10;

    private void Awake() {
        instance = this;
    }
    public virtual void Update() {
        IsDestory();
    }
    public void GetHurt(int damage){
        health -= damage;
    }

    private void IsDestory(){
        if(health <= 0){
            Destroy(gameObject);
        }
    }
    
}
